import threading
import time

def entry():
    for i in range(3):
        time.sleep(1)
        print(f'线程{threading.current_thread().name}正在执行{i}')

if __name__ == '__main__':
    start = time.time()
    print('主线程开始执行')

    lst = [threading.Thread(target=entry) for _ in range(2)]

    for t in lst:
        t.start()

    for t in lst:
        t.join()

    print(f'<UNK>{time.time()-start}<UNK>')

# 三个线程，主线程负责执行main
# thread-1执行三次循环、thread-2执行三次循环，交替执行，并发执行